package com.estore.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.estore.info.AgentProductInfo;

public class AgentProductInfoMapper implements RowMapper<AgentProductInfo> {

	@Override
	public AgentProductInfo mapRow(ResultSet rs, int arg1) throws SQLException {
		AgentProductInfo info = new AgentProductInfo();
		info.setAgentID(rs.getInt("agentid"));
		info.setCondition(rs.getString("productcondition"));
		info.setListID(rs.getInt("listid"));
		info.setListType(rs.getInt("listtype"));
		info.setProductID(rs.getInt("productid"));
		info.setSellingPrice(rs.getInt("sellingprice"));
		info.setStartDate(rs.getString("startdate"));
		info.setWarranty(rs.getInt("warranty"));
		info.setListStatus(rs.getInt("liststatus"));

		return info;
	}

}
